package com.loctek.importexport.data;

import java.io.Serializable;
import java.util.ArrayList;

/**
 * Created by timfei on 16/7/12.
 */
public class ImageFolder implements Serializable {

    public String name;                 //文件夹的名字

    public String path;                 //文件夹的路径

    public ImageItem cover;             //图片文件夹需要要显示的缩略图

    public ArrayList<ImageItem> images; //文件夹下所有图片的集合

    public int type;                    //0为图片,1为视频


    /**
     * 只要文件夹的路径和名字相同，就认为是相同的文件夹
     */
    @Override
    public boolean equals(Object o) {
        try {
            ImageFolder other = (ImageFolder) o;
            return this.path.equalsIgnoreCase(other.path) && this.name.equalsIgnoreCase(other.name);
        } catch (ClassCastException e) {
            e.printStackTrace();
        }
        return super.equals(o);
    }

}
